@use "sass:math";
// 默认设计稿的宽度
$designWidth: 1920;
// 默认设计稿的高度
$designHeight: 1080;

// px 转为 vw 的函数
@function vw($px) {
    @return math.div($px, $designWidth) * 100vw;
}

// px 转为 vh 的函数
@function vh($px) {
    @return math.div($px, $designHeight) * 100vh;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
textarea,
input,
select,
ul,
ol,
li,
fieldset,
figure {
    margin: 0;
    padding: 0;
    border: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: "微软雅黑";
}

ul,
li {
    list-style: none;
}
.el-button:focus-visible {
    outline: none;
}


.el-table {
    background-color: #0281A4;
    --el-table-border-color: rgba(11, 26, 50, 0.6);

    // :deep(.el-table__header) {
    //     width: auto !important;
    // }

    // :deep(.el-table__body) {
    //     width: auto !important;
    // }

    :deep(td) {
        border-bottom: none;
    }

    :deep(th) {
        font-size: vh(12);
        font-weight: 400;
        color: #00D2FF;
        line-height: 1;
    }


    .warning-row {
        background-color: rgba(11, 26, 50, 0.6);
    }

    .success-row {
        --el-table-tr-bg-color: rgba(11, 26, 50, 0.6);
    }

    /* 斑马纹颜色 */
    :deep(tr) {
        font-size: 12px;
        font-weight: 400;
        color: #FFFFFF;
        // background: rgba(11, 26, 50, 0.6) !important;
        background-color: #2B424A !important;

        &:last-child {
            td {
                border-bottom: none;

            }
        }

        .el-table__cell {
            // background: rgba(11, 26, 50, 0.6) !important;
            background-color: #2B424A !important;
            border-right: none;
            padding: 0;

            .cell {
                line-height: vh(31);
                height: vh(31);
                padding: 0 vh(10);
                font-size: vh(12);
            }
        }
    }

    :deep(thead) {
        tr {
            th {
                font-weight: 700;

                &.el-table__cell {
                    background-color: rgba(0, 227, 255, 0.1) !important;
                    // background-color: #2B424A !important;
                    border-bottom: none;

                    .cell {
                        line-height: vh(31);
                        height: vh(31);
                    }
                }

            }
        }


    }

    :deep(.cell) {
        white-space: nowrap;
        // overflow: visible;
    }

    /* 非斑马纹颜色 */
    :deep(.el-table__row--striped) {
        .el-table__cell {
            // background: #2B424A !important;
            background-color: rgba(0, 227, 255, 0.1) !important;
        }

    }

    :deep(.el-scrollbar__bar) {
        .el-scrollbar__thumb {
            width: vh(3);
            height: vh(3);
            background-color: #00C0FF;
            margin-left: vh(4);
        }

        &.is-horizontal {
            display: none;
        }
    }
}

:deep(.table_common) {
    border: 1px solid #5A7275;
    background-color: transparent;
    --el-table-border-color: transparent;

    th {
        font-size: vh(12);
        font-weight: bold;
        color: #9FF5FF;
        line-height: 1;
        border-bottom: 1px solid #5A7275 !important;
    }

    /* 斑马纹颜色 */
    tr {
        font-size: vh(12);
        font-weight: 400;
        color: #FFFFFF;
        // background: rgba(11, 26, 50, 0.6) !important;
        background-color: rgba(255, 255, 255, 0.05) !important;

        td {
            border-bottom: 1px solid #5A7275;
            border-right: 1px solid #5A7275;
        }

        &:last-child {
            td {
                border-bottom: none;
            }
        }

        .el-table__cell {
            // background: rgba(11, 26, 50, 0.6) !important;
            background-color: rgba(255, 255, 255, 0.05) !important;
            border-right: 1px solid #5A7275;
            padding: 0;
            &:last-child {
                border-right:none;
            }

            .cell {
                line-height: vh(36);
                height: vh(36);
                padding: 0 vh(10);
                font-size: vh(12);
            }
          
        }
    }



    /* 非斑马纹颜色 */
    .el-table__row--striped {
        .el-table__cell {
            // background: #2B424A !important;
            background-color: rgba(0, 170, 190, 0.05) !important;
        }

    }
}

.el-scrollbar {
    :deep(.el-scrollbar__bar.is-vertical) {
        width: vh(2);

        .el-scrollbar__thumb {
            // background-color: rgb(66, 179, 160, 0.25);
            background-color: #00C0FF;
            opacity: 1;
            width: vh(3);
        }
    }


}

::-webkit-scrollbar {
    /* 对应纵向滚动条的宽度 */
    width: vh(3);
    height: vh(3);
}

::-webkit-scrollbar-thumb {
    // background-color: rgba(192, 164, 91, 0.45);
    // background-color: rgba(192, 164, 91, 0.25);
    background-color: #0281A4;
    border-radius: vh(2);
}

:deep(.el-date-editor) {
    .el-input__wrapper {
        background-color: rgba(11, 122, 155, 0.5);
        box-shadow: none;
        font-size: vh(11);
        padding: vh(1) vh(8);

        .el-input__inner {
            color: #00E3FE;
        }

        .el-input__prefix {
            .el-input__icon {
                width: vh(12);
                height: vh(12);
                background: url(@/assets/images/digitalProduction/calendar.png) no-repeat;
                background-size: 100% 100%;

                svg {
                    display: none;
                }
            }
        }

    }
}

:focus-visible {
    outline: none;
}

button:focus,
button:focus-visible {
    outline: none;
}

.boxTitle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: vh(8);

    img {
        width: vh(15);
        height: vh(17);
    }

    .title {
        margin-left: vh(6);
        font-family: Source Han Sans CN;
        font-weight: 500;
        font-size: vh(16);
        color: #00E3FE;
        line-height: vh(16);
    }
}
:deep(.el-dialog) {
    .el-dialog__body {
        padding:0;
    }
}